#!/sbin/openrc-run

command="/usr/bin/acmed"
command_background=true
command_args="--foreground --config ${config_file:=/etc/acmed/acmed.toml} --log-stderr"
: ${command_user:=acmed:acmed}
: ${directory:=/var/lib/acmed}

error_log="/var/log/acmed.log"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -m 755 -o $command_user "$directory"
	checkpath -f -m 644 -o $command_user /var/log/acmed.log
}
